<section class="row">
  <div class="col-sm-6 col-sm-offset-3 panel panel-default">
    <h3 class="page-header">登录</h3>
    <form name="loginform" autocomplete="off" ng-submit="login()" class="form-horizontal">
      <div class="form-group has-feedback" ng-class="{'has-success':loginform.name.$valid && loginform.name.$dirty,'has-error':loginform.name.$invalid && loginform.name.$dirty}">
        <div class="col-sm-10 col-sm-offset-1">
          <div class="input-group">
            <span class="input-group-addon">
						<span class="glyphicon glyphicon-user"></span>
            </span>
            <input class="form-control" type="text" name="name" placeholder="请输入登录名" autofocus="autofocus" required="required" ng-model="user.name"></input>
          </div>
        </div>
      </div>
      <div class="form-group has-feedback" ng-class="{'has-success':loginform.password.$valid && loginform.password.$dirty,'has-error':loginform.password.$invalid && loginform.password.$dirty}">
        <div class="col-sm-10 col-sm-offset-1">
          <div class="input-group">
            <span class="input-group-addon">
						<span class="glyphicon glyphicon-lock"></span>
            </span>
            <input class="form-control" type="password" name="password" placeholder="请输入密码" autofocus="autofocus" required="required" ng-model="user.password"></input>
          </div>
        </div>
      </div>
      <div class="form-group form-actions">
        <div class="col-sm-10 col-sm-offset-1">
          <button type="submit" ng-disabled="loginform.$invalid" class="btn btn-md btn-primary">登 录</button>
        </div>
      </div>
    </form>
  </div>
</section>
